package com.gongj.lifecycle;

import org.springframework.context.Lifecycle;
import org.springframework.stereotype.Component;

//@Component
public class CustomizeLifecycle implements Lifecycle {

	private volatile boolean running = false;

	@Override
	public void start() {
		running = true;
		System.out.println("start ====> ");
	}

	@Override
	public void stop() {
		running = false;
		System.out.println("stop ====> ");
	}

	@Override
	public boolean isRunning() {
		System.out.println("isRunning ====> "+ running);
		return running;
	}
}
